<?php
	include_once('config.php');
	include_once('SystemOneAPI.php');
	$api_service_list = "http://systemone.uplb.edu.ph/api/auth/";
	$api = new SystemOneAPI($api_service_list, API_USERNAME, API_PASSWORD);
	
	
	$create_params = array( );
	$create_params['username'] = $_POST['username'];
	$create_params['password'] = $_POST['password'];
	$create_params['studentId'] = $_POST['studentId'];
	$create_params['firstName'] = $_POST['firstName'];
	$create_params['middleName'] = $_POST['middleName'];
	$create_params['lastName'] = $_POST['lastName'];
	$create_params['emailAddress'] = $_POST['emailAddress'];
	
	echo print_r($create_params);
	
	$result = $api->execute('create_student_account', $create_params);
	
	$service_list="http://202.92.144.6/api/profile/";
	$api1 = new SystemOneAPI($service_list, API_USERNAME, API_PASSWORD);

	$create = $api1->execute('create_student_account');
	
	
	$login_params = array( );
	$login_params['username'] = 'hellorbrhb';
	$login_params['password'] = 'world';
	//echo $login_params['username'].'<br />'.$login_params['password'].'<br />';
	$result = $api->execute('login', $login_params);
	
	echo print_r($result);
	$api->close();
?>